<template>
	<view class="combody">
		<view class="head flex-row">
			<view class="headtetx ischoose" style="">
				推荐医院
				<view class="linebox">
				</view>
			</view>
		</view>
		<view class="hosbox">
			<view @click="tohosdetail(item.id)" class="hositem flex-row" style="border: 0rpx solid #D7DDDC;" v-for="(item,index) in hospitalList" :key="index">
				<view class="imgbox" :style="{ background: 'url(' +baseUrl+ item.url + ') no-repeat' }">
				</view>
				<view class="" style="padding: 0 16rpx;">
					<view class="color303b39" style="margin-top: 24rpx;font-weight: 800;font-size: 36rpx;line-height: 48rpx;">
						{{item.hospitalName}}
					</view>
					<view class="lineclamp2" style="margin-top: 16rpx;padding: 10rpx 16rpx;line-height: 48rpx;color:#00977C;background: #EDFCF9;border-radius: 16rpx;">
						<view class="" style="">
							地址:{{item.hospitalAddress}}
						</view>
					</view>
				</view>
			</view>
		</view>
		
		
	</view>
</template>

<script>
	import config from '@/config'
	export default {
		props:['hospitalList'],
		data() {
			return {
				baseUrl:config.baseUrl,
				hospitalImgPath:'../../../static/images/hosimg.jpg',
				
			}
		},
		methods:{
			tohosdetail(id){
				uni.navigateTo({
					url:'/pages/knowledge/hosdetail?id='+id
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.combody {
		background: #fff;
		border-radius: 32rpx;
		margin-top: 16rpx;

		.head {
			height: 110rpx;
			padding: 10rpx 32rpx 0;
			border-bottom: 1px solid #D7DDDC;

			.headtetx {
				font-size: 40rpx;
				display: flex;
				align-items: center;
				height: 100rpx;
				margin-right: 40rpx;
				position: relative;

				.linebox {
					position: absolute;
					bottom: 0;
					width: 160rpx;
					height: 10rpx;
					background: #00D9B2;
					border-radius: 50rpx;
				}
			}

			.ischoose {
				color: #303B39;
				font-weight: 800;
			}

			.nochoose {
				color: #576260;
				font-weight: 400;
			}
		}
		.hosbox{
			padding: 41rpx 0 24rpx 24rpx;
			.hositem{
				border-radius: 24rpx;
				margin-right: 16rpx;
				margin-bottom: 16rpx;
				.imgbox{
					height: 248rpx;
					width: 248rpx;
					background-size: cover !important;
					border-radius: 24rpx 24rpx 0 0;
					flex-shrink: 0;
					
				}
			}
		}

	}
</style>